import {HxPost} from './http';

const run = (cardId) => {
    HxPost('payNum', {cardId})
        .then((res) => {
            uni.$emit('payNum', {
                index: 2,
                text: res.unChargeCnt ? res.unChargeCnt + '' : ''
            });
        });
    HxPost('searchNotice', {cardId, pageNo: '1', pageSize: '100'})
        .then((res) => {
            uni.$emit('notice', res.contentList || []);
        });

    HxPost('rewardNum', {})
        .then((res) => {
            uni.$emit('rewardNum', res.unTakeCnt);
        });
};

export const HxTask = {
    run,
};
